/* Copyright (C) 2010 Luca Piccinelli
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/* 
 * File:   pdl_visitors.h
 * Author: picci
 *
 * Created on May 19, 2011, 9:37 PM
 */

#ifndef PDL_VISITORS_H
#define	PDL_VISITORS_H

#include "prj_definitions.h"
#include "common/pdl.h"
#include "exceptions/visitor_exceptions.h"

namespace NAMESPACE{

class PDLElementVisitor{
public:
    virtual ~PDLElementVisitor(){};
    virtual double visitPDLLiteral(const PDLLiteral& l) throw(bad_visitor) = 0;
    virtual void visitPDLPair(const PDLPair& p) throw(bad_visitor) = 0;
    virtual double visitPDLRange(const PDLRange& range) throw(bad_visitor) = 0;
    virtual void visitPDLComposite(const PDLComposite& composite) throw(bad_visitor) = 0;
};

// ****** QtGuiPDLVisitor ******************************************************
//class QtGuiPDLVisitor : public PDLElementVisitor{
//private:
//    QLayout* layout;
//public:
//    ~QtGuiPDLVisitor();
//    QtGuiPDLVisitor();
//    QtGuiPDLVisitor(const QtGuiPDLVisitor& visitor);
//    QtGuiPDLVisitor(QLayout* _layout);
//    const QtGuiPDLVisitor& operator=(const QtGuiPDLVisitor& visitor);
//    
//    void set_layout(QLayout* _layout);
//    void set_layout_address(long _layout_address);
//    double visitPDLRange(const PDLRange& range) throw(bad_visitor);
//    void   visitPDLComposite(const PDLComposite& composite) throw(bad_visitor);
//};
// -----------------------------------------------------------------------------

}

#endif	/* PDL_VISITORS_H */

